package metalink.admin;

import java.util.ArrayList;

import model.admin.GetCourseListMo;
import vo.mixed.CourseListVo;
import vo.mixed.ProfessorListVo;

import com.opensymphony.xwork2.ActionSupport;

public class GetCourseList extends ActionSupport {
	int course_id;
	int staff_id;
	
	public int getStaff_id() {
		return staff_id;
	}

	public void setStaff_id(int staff_id) {
		this.staff_id = staff_id;
	}

	ArrayList<CourseListVo> course_list;
	int professor_id;

	public int getProfessor_id() {
		return professor_id;
	}

	public void setProfessor_id(int professor_id) {
		this.professor_id = professor_id;
	}

	public int getCourse_id() {
		return course_id;
	}

	public void setCourse_id(int course_id) {
		this.course_id = course_id;
	}

	ArrayList<ProfessorListVo> course_professor_list;

	public ArrayList<ProfessorListVo> getCourse_professor_list() {
		return course_professor_list;
	}

	public void setCourse_professor_list(
			ArrayList<ProfessorListVo> course_professor_list) {
		this.course_professor_list = course_professor_list;
	}

	public ArrayList<CourseListVo> getCourse_list() {
		return course_list;
	}

	public void setCourse_list(ArrayList<CourseListVo> course_list) {
		this.course_list = course_list;
	}

	public String execute() {
		GetCourseListMo course_list_object = new GetCourseListMo();
		setCourse_list(course_list_object.getCourseList(0));
		return SUCCESS;
	}

	public String getCourseProfessorDetails() {
		GetCourseListMo courseProfListObj = new GetCourseListMo();
		setCourse_professor_list(courseProfListObj.getCourseProfessorDetails(course_id,0));
		return SUCCESS;
	}

	public String getCourseProfessorCourseDetails() {
		GetCourseListMo courseProfCourseListObj = new GetCourseListMo();
		setCourse_list(courseProfCourseListObj.getCourseList(professor_id));
		return SUCCESS;
	}
}
